package commands;

import utils.Clock;
import controllers.MetronomeController;

public class StartMetronomeCommand implements ICommand
{
	private MetronomeController metronomeController;
	
	/**
	 * Constructeur
	 * @param metronomeController : Le controller
	 */
	public StartMetronomeCommand(MetronomeController metronomeController)
	{
		this.metronomeController = metronomeController;
	}
	
	@Override
	public void execute() 
	{
		System.out.println("START");
		
		this.metronomeController.updateMetronomeState(true);
		Clock.StartBattreTempo(new TempoLedCommand(this.metronomeController), new MeasureLedCommand(this.metronomeController), 
				this.metronomeController.getMetronome().getTempo(), this.metronomeController.getMetronome().getMeasure());
	}
}
